home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / SASC_6.0_Disk_4.adf / Compiler_Headers / Include / rexx / rexxio.h < prev    next >
C/C++ Source or Header  |  1992-07-30  |  3KB  |  85 lines

  1. #ifndef REXX_REXXIO_H
  2. #define REXX_REXXIO_H
  3. /*
  4. **    $Filename: rexx/rexxio.h $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 1.4 $
  7. **    $Date: 91/11/08 $
  8. **
  9. **    Header file for ARexx Input/Output related structures
  10. **
  11. **    (C) Copyright 1986,1987,1988,1989,1990 William S. Hawes
  12. **    (C) Copyright 1990-1991 Commodore-Amiga, Inc.
  13. **        All Rights Reserved
  14. */
  15.  
  16. #ifndef REXX_STORAGE_H
  17. #include "rexx/storage.h"
  18. #endif
  19.  
  20. #define RXBUFFSZ  204               /* buffer length        */
  21.  
  22. /*
  23.  * The IoBuff is a resource node used to maintain the File List.  Nodes
  24.  * are allocated and linked into the list whenever a file is opened.
  25.  */
  26. struct IoBuff {
  27.    struct RexxRsrc iobNode;           /* structure for files/strings    */
  28.    APTR     iobRpt;               /* read/write pointer        */
  29.    LONG     iobRct;               /* character count        */
  30.    LONG     iobDFH;               /* DOS filehandle        */
  31.    APTR     iobLock;               /* DOS lock            */
  32.    LONG     iobBct;               /* buffer length        */
  33.    BYTE     iobArea[RXBUFFSZ];           /* buffer area            */
  34.    };                       /* size: 256 bytes        */
  35.  
  36. /* Access mode definitions                        */
  37. #define RXIO_EXIST   -1           /* an external filehandle    */
  38. #define RXIO_STRF    0               /* a "string file"        */
  39. #define RXIO_READ    1               /* read-only access        */
  40. #define RXIO_WRITE   2               /* write mode            */
  41. #define RXIO_APPEND  3               /* append mode (existing file)    */
  42.  
  43. /*
  44.  * Offset anchors for SeekF()
  45.  */
  46. #define RXIO_BEGIN   -1L           /* relative to start        */
  47. #define RXIO_CURR    0L           /* relative to current position    */
  48. #define RXIO_END     1L           /* relative to end        */
  49.  
  50. /* The Library List contains just plain resource nodes.        */
  51.  
  52. #define LLOFFSET(rrp) (rrp->rr_Arg1)   /* "Query" offset        */
  53. #define LLVERS(rrp)   (rrp->rr_Arg2)   /* library version        */
  54.  
  55. /*
  56.  * The RexxClipNode structure is used to maintain the Clip List.  The value
  57.  * string is stored as an argstring in the rr_Arg1 field.
  58.  */
  59. #define CLVALUE(rrp) ((STRPTR) rrp->rr_Arg1)
  60.  
  61. /*
  62.  * A message port structure, maintained as a resource node.  The ReplyList
  63.  * holds packets that have been received but haven't been replied.
  64.  */
  65. struct RexxMsgPort {
  66.    struct RexxRsrc rmp_Node;           /* linkage node            */
  67.    struct MsgPort  rmp_Port;           /* the message port        */
  68.    struct List       rmp_ReplyList;      /* messages awaiting reply    */
  69.    };
  70.  
  71. /*
  72.  * DOS Device types
  73.  */
  74. #define DT_DEV      0L               /* a device            */
  75. #define DT_DIR      1L               /* an ASSIGNed directory    */
  76. #define DT_VOL      2L               /* a volume            */
  77.  
  78. /*
  79.  * Private DOS packet types
  80.  */
  81. #define ACTION_STACK 2002L           /* stack a line            */
  82. #define ACTION_QUEUE 2003L           /* queue a line            */
  83.  
  84. #endif
  85.